Make your Rust code unit testable with dependency inversion Use Traits to invert your Rust dependencies and keep your code loosely-coupled and testable.